package io.gitee.cloudladder.obsidian.swagger2.example.controller;

import io.gitee.cloudladder.obsidian.swagger2.annotation.ApiOperationSort;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@Api(value = "Test Method Controller")
public class TestMethodController {

    @ApiOperationSort(1)
    @GetMapping("/test/method/get")
    public void testMethodGet() {
        log.info("testMethodGet");
    }

    @ApiOperationSort(2)
    @PostMapping("/test/method/post")
    public void testMethodPost() {
        log.info("testMethodPost");
    }

    @ApiOperationSort(3)
    @PutMapping("/test/method/put")
    public void testMethodPut() {
        log.info("testMethodPut");
    }

    @ApiOperationSort(4)
    @DeleteMapping("/test/method/delete")
    public void testMethodDelete() {
        log.info("testMethodDelete");
    }

    @ApiOperationSort(5)
    @RequestMapping(value = "/test/method/options", method = RequestMethod.OPTIONS)
    public void testMethodOptions() {
        log.info("testMethodOptions");
    }

    @ApiOperationSort(6)
    @RequestMapping(value = "/test/method/head", method = RequestMethod.HEAD)
    public void testMethodHead() {
        log.info("testMethodHead");
    }

    @ApiOperationSort(7)
    @RequestMapping(value = "/test/method/options", method = RequestMethod.PATCH)
    public void testMethodPatch() {
        log.info("testMethodPatch");
    }

    @ApiOperationSort(8)
    @RequestMapping(value = "/test/method/options", method = RequestMethod.TRACE)
    public void testMethodTrace() {
        log.info("testMethodTrace");
    }

}

